<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>某某科技 - 后台管理系统</title>
    <style>
        :root {
            --primary-color: #3498db;
            --secondary-color: #2c3e50;
            --success-color: #2ecc71;
            --danger-color: #e74c3c;
            --warning-color: #f39c12;
            --light-color: #ecf0f1;
            --dark-color: #34495e;
            --sidebar-width: 250px;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Microsoft YaHei', Arial, sans-serif;
        }

        body {
            background-color: #f5f5f5;
            color: #333;
            display: flex;
            min-height: 100vh;
        }

        /* 侧边栏样式 */
        .sidebar {
            width: var(--sidebar-width);
            background-color: var(--secondary-color);
            color: white;
            position: fixed;
            height: 100vh;
            transition: all 0.3s;
            z-index: 100;
        }

        .sidebar-header {
            padding: 20px;
            background-color: rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
        }

        .sidebar-header h3 {
            margin-left: 10px;
            font-size: 18px;
        }

        .sidebar-menu {
            padding: 20px 0;
        }

        .sidebar-menu ul {
            list-style: none;
        }

        .sidebar-menu li {
            position: relative;
        }

        .sidebar-menu li a {
            display: block;
            padding: 12px 20px;
            color: #bdc3c7;
            text-decoration: none;
            transition: all 0.3s;
            display: flex;
            align-items: center;
        }

        .sidebar-menu li a:hover,
        .sidebar-menu li a.active {
            color: white;
            background-color: rgba(0, 0, 0, 0.2);
        }

        .sidebar-menu li a i {
            margin-right: 10px;
            font-size: 18px;
            width: 20px;
            text-align: center;
        }

        .sidebar-menu li a .menu-arrow {
            margin-left: auto;
            transition: transform 0.3s;
        }

        .sidebar-menu li.active > a .menu-arrow {
            transform: rotate(90deg);
        }

        .submenu {
            display: none;
            background-color: rgba(0, 0, 0, 0.1);
        }

        .sidebar-menu li.active > .submenu {
            display: block;
        }

        /* 主内容区域 */
        .main-content {
            flex: 1;
            margin-left: var(--sidebar-width);
            transition: all 0.3s;
        }

        /* 顶部导航栏 */
        .top-navbar {
            background-color: white;
            padding: 15px 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 99;
        }

        .menu-toggle {
            font-size: 20px;
            cursor: pointer;
            color: var(--secondary-color);
        }

        .user-profile {
            display: flex;
            align-items: center;
        }

        .user-profile img {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .user-info {
            margin-right: 15px;
        }

        .user-info h5 {
            margin-bottom: 2px;
            font-size: 14px;
        }

        .user-info p {
            font-size: 12px;
            color: #7f8c8d;
        }

        /* 内容区域 */
        .content-wrapper {
            padding: 25px;
        }

        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .page-header h2 {
            font-size: 24px;
            color: var(--secondary-color);
        }

        .breadcrumb {
            display: flex;
            list-style: none;
        }

        .breadcrumb li {
            margin-right: 10px;
            font-size: 14px;
        }

        .breadcrumb li:not(:last-child)::after {
            content: '/';
            margin-left: 10px;
            color: #95a5a6;
        }

        .breadcrumb li a {
            color: var(--primary-color);
            text-decoration: none;
        }

        /* 卡片样式 */
        .card {
            background-color: white;
            border-radius: 5px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            margin-bottom: 25px;
        }

        .card-header {
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .card-header h4 {
            font-size: 16px;
            color: var(--secondary-color);
        }

        .card-body {
            padding: 20px;
        }

        /* 统计卡片 */
        .stats-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .stats-card {
            background-color: white;
            border-radius: 5px;
            padding: 20px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
        }

        .stats-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            margin-right: 15px;
            color: white;
        }

        .stats-icon.primary {
            background-color: var(--primary-color);
        }

        .stats-icon.success {
            background-color: var(--success-color);
        }

        .stats-icon.warning {
            background-color: var(--warning-color);
        }

        .stats-icon.danger {
            background-color: var(--danger-color);
        }

        .stats-info h3 {
            font-size: 24px;
            margin-bottom: 5px;
        }

        .stats-info p {
            color: #7f8c8d;
            font-size: 14px;
        }

        /* 表格样式 */
        .table-responsive {
            overflow-x: auto;
        }

        .table {
            width: 100%;
            border-collapse: collapse;
        }

        .table th,
        .table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #eee;
        }

        .table th {
            background-color: #f8f9fa;
            color: var(--secondary-color);
            font-weight: 600;
        }

        .table tr:hover {
            background-color: #f8f9fa;
        }

        .badge {
            display: inline-block;
            padding: 5px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .badge-primary {
            background-color: #e3f2fd;
            color: var(--primary-color);
        }

        .badge-success {
            background-color: #e8f5e9;
            color: var(--success-color);
        }

        .badge-warning {
            background-color: #fff8e1;
            color: var(--warning-color);
        }

        .badge-danger {
            background-color: #ffebee;
            color: var(--danger-color);
        }

        /* 表单样式 */
        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--secondary-color);
        }

        .form-control {
            width: 100%;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 14px;
            transition: all 0.3s;
        }

        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
            outline: none;
        }

        textarea.form-control {
            min-height: 120px;
            resize: vertical;
        }

        .btn {
            display: inline-block;
            padding: 10px 20px;
            border-radius: 5px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all 0.3s;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background-color: #2980b9;
        }

        .btn-outline-primary {
            background-color: transparent;
            border: 1px solid var(--primary-color);
            color: var(--primary-color);
        }

        .btn-outline-primary:hover {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-danger {
            background-color: var(--danger-color);
            color: white;
        }

        .btn-danger:hover {
            background-color: #c0392b;
        }

        .btn-sm {
            padding: 5px 10px;
            font-size: 12px;
        }

        /* 分页 */
        .pagination {
            display: flex;
            list-style: none;
            margin-top: 20px;
        }

        .pagination li {
            margin-right: 5px;
        }

        .pagination li a {
            display: block;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 5px;
            text-decoration: none;
            color: var(--secondary-color);
        }

        .pagination li.active a {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        .pagination li a:hover {
            background-color: #f8f9fa;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .sidebar {
                margin-left: -250px;
            }

            .sidebar.active {
                margin-left: 0;
            }

            .main-content {
                margin-left: 0;
            }

            .main-content.active {
                margin-left: 250px;
            }
        }
    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body>
<!-- 侧边栏 -->
<div class="sidebar">
    <div class="sidebar-header">
        <i class="fas fa-laptop-code"></i>
        <h3>某某科技后台</h3>
    </div>

    <div class="sidebar-menu">
        <ul>
            <li>
                <a href="#" class="active">
                    <i class="fas fa-tachometer-alt"></i>
                    <span>控制面板</span>
                </a>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-sitemap"></i>
                    <span>网站内容</span>
                    <span class="menu-arrow"><i class="fas fa-angle-right"></i></span>
                </a>
                <ul class="submenu">
                    <li><a href="#">页面管理</a></li>
                    <li><a href="#">新闻管理</a></li>
                    <li><a href="#">产品管理</a></li>
                    <li><a href="#">案例管理</a></li>
                </ul>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-users"></i>
                    <span>用户管理</span>
                    <span class="menu-arrow"><i class="fas fa-angle-right"></i></span>
                </a>
                <ul class="submenu">
                    <li><a href="#">管理员</a></li>
                    <li><a href="#">客户管理</a></li>
                    <li><a href="#">角色权限</a></li>
                </ul>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-envelope"></i>
                    <span>消息中心</span>
                    <span class="menu-arrow"><i class="fas fa-angle-right"></i></span>
                </a>
                <ul class="submenu">
                    <li><a href="#">留言管理</a></li>
                    <li><a href="#">邮件通知</a></li>
                    <li><a href="#">系统消息</a></li>
                </ul>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-cog"></i>
                    <span>系统设置</span>
                    <span class="menu-arrow"><i class="fas fa-angle-right"></i></span>
                </a>
                <ul class="submenu">
                    <li><a href="#">基本设置</a></li>
                    <li><a href="#">SEO设置</a></li>
                    <li><a href="#">导航菜单</a></li>
                    <li><a href="#">备份恢复</a></li>
                </ul>
            </li>
            <li>
                <a href="#">
                    <i class="fas fa-chart-line"></i>
                    <span>统计分析</span>
                </a>
            </li>
        </ul>
    </div>
</div>

<!-- 主内容区域 -->
<div class="main-content">
    <!-- 顶部导航栏 -->
    <div class="top-navbar">
        <div class="menu-toggle">
            <i class="fas fa-bars"></i>
        </div>
        <div class="user-profile">
            <div class="user-info">
                <h5>管理员</h5>
                <p>超级管理员</p>
            </div>
            <img src="https://via.placeholder.com/40" alt="用户头像">
            <div class="dropdown" style="margin-left: 15px;">
                <i class="fas fa-ellipsis-v"></i>
            </div>
        </div>
    </div>

    <!-- 内容区域 -->
    <div class="content-wrapper">
        <div class="page-header">
            <h2>控制面板</h2>
            <ul class="breadcrumb">
                <li><a href="#">首页</a></li>
                <li>控制面板</li>
            </ul>
        </div>

        <!-- 统计卡片 -->
        <div class="stats-cards">
            <div class="stats-card">
                <div class="stats-icon primary">
                    <i class="fas fa-eye"></i>
                </div>
                <div class="stats-info">
                    <h3>1,254</h3>
                    <p>今日访问量</p>
                </div>
            </div>
            <div class="stats-card">
                <div class="stats-icon success">
                    <i class="fas fa-users"></i>
                </div>
                <div class="stats-info">
                    <h3>356</h3>
                    <p>新增用户</p>
                </div>
            </div>
            <div class="stats-card">
                <div class="stats-icon warning">
                    <i class="fas fa-shopping-cart"></i>
                </div>
                <div class="stats-info">
                    <h3>124</h3>
                    <p>新增订单</p>
                </div>
            </div>
            <div class="stats-card">
                <div class="stats-icon danger">
                    <i class="fas fa-comments"></i>
                </div>
                <div class="stats-info">
                    <h3>56</h3>
                    <p>未读消息</p>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-8">
                <!-- 最近活动卡片 -->
                <div class="card">
                    <div class="card-header">
                        <h4>最近活动</h4>
                        <div>
                            <button class="btn btn-sm btn-outline-primary">查看全部</button>
                        </div>
                    </div>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>用户</th>
                                    <th>操作</th>
                                    <th>时间</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td>1</td>
                                    <td>管理员</td>
                                    <td>登录系统</td>
                                    <td>2023-05-15 09:30</td>
                                    <td><span class="badge badge-success">成功</span></td>
                                    <td>
                                        <button class="btn btn-sm btn-outline-primary">详情</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>2</td>
                                    <td>张三</td>
                                    <td>修改产品信息</td>
                                    <td>2023-05-15 10:15</td>
                                    <td><span class="badge badge-success">成功</span></td>
                                    <td>
                                        <button class="btn btn-sm btn-outline-primary">详情</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td>李四</td>
                                    <td>删除新闻</td>
                                    <td>2023-05-15 11:20</td>
                                    <td><span class="badge badge-success">成功</span></td>
                                    <td>
                                        <button class="btn btn-sm btn-outline-primary">详情</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td>王五</td>
                                    <td>添加新用户</td>
                                    <td>2023-05-15 14:05</td>
                                    <td><span class="badge badge-warning">待审核</span></td>
                                    <td>
                                        <button class="btn btn-sm btn-outline-primary">详情</button>
                                    </td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td>管理员</td>
                                    <td>系统备份</td>
                                    <td>2023-05-15 16:30</td>
                                    <td><span class="badge badge-success">成功</span></td>
                                    <td>
                                        <button class="btn btn-sm btn-outline-primary">详情</button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>

                        <div class="pagination">
                            <li><a href="#">&laquo;</a></li>
                            <li class="active"><a href="#">1</a></li>
                            <li><a href="#">2</a></li>
                            <li><a href="#">3</a></li>
                            <li><a href="#">&raquo;</a></li>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-md-4">
                <!-- 快速操作卡片 -->
                <div class="card">
                    <div class="card-header">
                        <h4>快速操作</h4>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <button class="btn btn-primary btn-block">
                                <i class="fas fa-plus"></i> 添加新内容
                            </button>
                        </div>
                        <div class="form-group">
                            <button class="btn btn-outline-primary btn-block">
                                <i class="fas fa-edit"></i> 编辑首页
                            </button>
                        </div>
                        <div class="form-group">
                            <button class="btn btn-outline-primary btn-block">
                                <i class="fas fa-users"></i> 用户管理
                            </button>
                        </div>
                        <div class="form-group">
                            <button class="btn btn-outline-primary btn-block">
                                <i class="fas fa-cog"></i> 系统设置
                            </button>
                        </div>
                    </div>
                </div>

                <!-- 系统信息卡片 -->
                <div class="card">
                    <div class="card-header">
                        <h4>系统信息</h4>
                    </div>
                    <div class="card-body">
                        <div class="form-group">
                            <label>系统版本</label>
                            <p>v2.5.0</p>
                        </div>
                        <div class="form-group">
                            <label>最后备份</label>
                            <p>2023-05-14 23:00</p>
                        </div>
                        <div class="form-group">
                            <label>服务器状态</label>
                            <p><span class="badge badge-success">运行正常</span></p>
                        </div>
                        <div class="form-group">
                            <label>存储空间</label>
                            <div style="background-color: #f1f1f1; border-radius: 5px; height: 10px; margin-top: 5px;">
                                <div style="width: 65%; background-color: var(--primary-color); height: 100%; border-radius: 5px;"></div>
                            </div>
                            <p style="text-align: right; margin-top: 5px;">65% 已使用</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 产品管理表单示例 -->
        <div class="card">
            <div class="card-header">
                <h4>添加新产品</h4>
            </div>
            <div class="card-body">
                <form>
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>产品名称</label>
                                <input type="text" class="form-control" placeholder="请输入产品名称">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label>产品分类</label>
                                <select class="form-control">
                                    <option>请选择分类</option>
                                    <option>软件产品</option>
                                    <option>硬件产品</option>
                                    <option>服务产品</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label>产品描述</label>
                        <textarea class="form-control" rows="3" placeholder="请输入产品描述"></textarea>
                    </div>

                    <div class="row">
                        <div class="col-md-4">
                            <div class="form-group">
                                <label>价格</label>
                                <input type="number" class="form-control" placeholder="0.00">
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label>库存</label>
                                <input type="number" class="form-control" placeholder="0">
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="form-group">
                                <label>状态</label>
                                <select class="form-control">
                                    <option>上架</option>
                                    <option>下架</option>
                                    <option>预售</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label>产品图片</label>
                        <input type="file" class="form-control">
                        <small class="text-muted">支持JPG, PNG格式，大小不超过2MB</small>
                    </div>

                    <div class="form-group">
                        <button type="submit" class="btn btn-primary">保存产品</button>
                        <button type="reset" class="btn btn-outline-primary">重置</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    // 侧边栏折叠功能
    document.querySelector('.menu-toggle').addEventListener('click', function() {
        document.querySelector('.sidebar').classList.toggle('active');
        document.querySelector('.main-content').classList.toggle('active');
    });

    // 子菜单展开/折叠功能
    const menuItemsWithSubmenu = document.querySelectorAll('.sidebar-menu li:has(.submenu)');

    menuItemsWithSubmenu.forEach(item => {
        const link = item.querySelector('a');

        link.addEventListener('click', function(e) {
            e.preventDefault();

            // 如果点击的是当前活动的菜单项，则关闭子菜单
            if (item.classList.contains('active')) {
                item.classList.remove('active');
            } else {
                // 先关闭所有其他子菜单
                menuItemsWithSubmenu.forEach(otherItem => {
                    if (otherItem !== item) {
                        otherItem.classList.remove('active');
                    }
                });

                // 打开当前子菜单
                item.classList.add('active');
            }
        });
    });

    // 模拟数据加载
    setTimeout(() => {
        const statsCards = document.querySelectorAll('.stats-card h3');
        statsCards[0].textContent = '1,876';
        statsCards[1].textContent = '421';
        statsCards[2].textContent = '189';
        statsCards[3].textContent = '32';
    }, 1000);
</script>
</body>
</html>